//
//  HomeViewController.m
//  TestDemo
//
//  Created by 张润东 on 2021/8/19.
//

#import "HomeViewController.h"
#import <CHNMarcos/MacroDefinition.h>
#import "SpecialViewController.h"
@interface HomeViewController ()

@end

@implementation HomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor cyanColor];
    UIButton *btn = [UIButton new];
    btn.frame =CGRectMake(SafeArea_Height(), NAV_HEIGHT, SmtSize(100), SmtSize(120));
    [btn setTitleColor:Title_Color() forState:UIControlStateNormal];
    [btn setTitleColor:Comment_Color() forState:UIControlStateHighlighted];
    [self.view addSubview:btn];
    [btn.titleLabel setFont:SmtCustomFont(22, UIFontWeightMedium)];
    [btn setTitle:@"主页" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(nextView) forControlEvents:UIControlEventTouchUpInside];
}
//隐藏nav
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:NO];
}
//展示nav
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:NO];
}


-(void)nextView{
    SpecialViewController *vc =  [[SpecialViewController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
